All Questions
17 questions
3votes
1answer
134views
1vote
1answer
140views
Transform an array into object and set index for an unique key in javascript
I have a method that merges keys and indexes from an array into an object. I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler. Goal get an array of objects ...
1vote
2answers
208views
Simplify a function which performs manipulation of data in Javascript
Upon suggestion in the original question within Stack Overflow, I'm bringing my question here. We have created a function that will convert the data into the desired format, but it has a lot of code ...
11votes
4answers
3kviews
Restructuring JSON to create a new JSON where properties are grouped according to similar values
I have a JSON structure in the following example format: ...
0votes
2answers
93views
Functional Programming Style in Javascript Picking a Random Item from an Array
I'm trying to understand the Functional Programming Paradigm (or style) implemented with Javascript. There are a few things I have difficulties with. The naming conventions, and dependency injections. ...
1vote
1answer
105views
JavaScript, looping, and functional approach
Data Structure coming back from the server ...
6votes
3answers
1kviews
Finding even or odd numbers
I'm looking for critiques to see what I could have done better or different ways I could approach writing a script for finding even or odd numbers. I am new to programming with JavaScript, and ...
13votes
5answers
3kviews
Vue.js search functionality
In my BlogList.vue component I made a search input field: ...
1vote
1answer
53views
0votes
3answers
291views
Finding nth lowest value without any Math max or min methods
So I decided to make a more efficient solution to a Google interview question where they ask you to either find the lowest or second lowest value in an array without using the max or min methods. I ...
2votes
1answer
127views
Manipulating arrays to extract unique objects and count occurrences
The data describes cycling activities (key1) and chunks of them (key2). In total there are around 1,000 ...
2votes
3answers
69views
Collecting a list of documents from a factory for an AngularJS controller
With this controller I'm injecting myFactory and using Array.push() to add the array ...
5votes
3answers
112views
Aggregate summary counts for an array of error objects
I'm doing some refactoring of someone else's code, and just want a second opinion, because of course I think my work makes it better, but some validation (or correction) would be helpful. Starting ...
10votes
2answers
696views
Array duplicate removal for duplicates exceeding `N`-number
I recently encountered a front-end interview coding challenge question that required one to create a function which returned an array that excluded numbers that occurred more than ...
1vote
2answers
614views
Finding the difference between two different arrays using JS and FP
I'm trying to practice functional programing using JavaScript. These pure functions just work together to find the difference between two arrays. I know that this might be an impractical example of ...